﻿<Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:tools="clr-namespace:_3DTools;assembly=3DTools"

    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" x:Name="Window" x:Class="ARSS.Editor.Visual.PreviewWindow"
    Title="Scene Editor" Height="480" Width="640" WindowStartupLocation="CenterScreen" WindowState="Maximized" mc:Ignorable="d" SizeChanged="Window_SizeChanged" Closing="Window_Closing">
	<Grid Background="Black">
	<tools:TrackballDecorator>
		<Viewport3D x:Name="MainViewPort">
			<Viewport3D.Camera>
				<PerspectiveCamera x:Name="MainCamera" FieldOfView="45" FarPlaneDistance="10000" LookDirection="0,0,-1" NearPlaneDistance="0.1" Position="0,0,10" UpDirection="0,1,0" >
				<PerspectiveCamera.Transform>
					<MatrixTransform3D />
				</PerspectiveCamera.Transform>
				</PerspectiveCamera>
			</Viewport3D.Camera>
			<ModelVisual3D>
				<ModelVisual3D.Content>
					<Model3DGroup>
						<AmbientLight Color="White"/>
                        
					</Model3DGroup>
				</ModelVisual3D.Content>
			</ModelVisual3D>
            <ModelVisual3D x:Name="ModelContainer" >
            	<ModelVisual3D.Transform>
            		<Transform3DGroup >
						<RotateTransform3D>
							<RotateTransform3D.Rotation>
								<AxisAngleRotation3D Axis="0, 1, 0" Angle="0" x:Name="CameraYawAngle" />
							</RotateTransform3D.Rotation>
						</RotateTransform3D>
						<RotateTransform3D>
							<RotateTransform3D.Rotation>
								<AxisAngleRotation3D Axis="1, 0, 0" x:Name="CameraPitchAngle" />
							</RotateTransform3D.Rotation>
						</RotateTransform3D>
					</Transform3DGroup>
            	</ModelVisual3D.Transform>
				<ModelVisual3D.Children>
					<tools:ScreenSpaceLines3D Color="Red" x:Name="OriginX" Thickness="3">
						<tools:ScreenSpaceLines3D.Points>
							<Point3D X="0" Y="0" Z="0" />
							<Point3D X="0" Y="0" Z="0" />
						</tools:ScreenSpaceLines3D.Points>
					</tools:ScreenSpaceLines3D>
					<tools:ScreenSpaceLines3D Color="Green" x:Name="OriginY" Thickness="3">
						<tools:ScreenSpaceLines3D.Points>
							<Point3D X="0" Y="0" Z="0" />
							<Point3D X="0" Y="0" Z="0" />
						</tools:ScreenSpaceLines3D.Points>
					</tools:ScreenSpaceLines3D>
					<tools:ScreenSpaceLines3D Color="Blue" x:Name="OriginZ" Thickness="3">
						<tools:ScreenSpaceLines3D.Points>
							<Point3D X="0" Y="0" Z="0" />
							<Point3D X="0" Y="0" Z="0" />
						</tools:ScreenSpaceLines3D.Points>
					</tools:ScreenSpaceLines3D>
				</ModelVisual3D.Children>
            </ModelVisual3D>
		</Viewport3D>
		</tools:TrackballDecorator>
		<Menu VerticalAlignment="Top" Height="22">
			<MenuItem x:Name="FileMenu" Margin="0" Header="File">
				<MenuItem x:Name="FileMenu_New" Width="100" Height="20.5" Header="New" Click="FileMenu_New_Click"/>
				<MenuItem x:Name="FileMenu_Open" Width="100" Height="19" Header="Open" Click="FileMenu_Open_Click"/>
				<MenuItem x:Name="FileMenu_Save" Header="Save" Click="FileMenu_Save_Click"/>
				<Separator />
				<MenuItem x:Name="FileMenu_Exit" Header="Exit" Click="FileMenu_Exit_Click"/>
			</MenuItem>
			<MenuItem x:Name="EditorMenu" Margin="0" Header="Editor">
				<MenuItem x:Name="EditorMenu_SceneNodes" Width="120" Height="22" Header="Scene Nodes" Click="EditorMenu_SceneNodes_Click"/>
				<MenuItem x:Name="EditorMenu_Animation" Header="Animation" Click="EditorMenu_Animation_Click"/>
				<MenuItem x:Name="EditorMenu_SceneSettings" Header="Scene Settings" Click="EditorMenu_SceneSettings_Click" Margin="0" HorizontalAlignment="Left"/>
			</MenuItem>
		</Menu>
	</Grid>
</Window>
